home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / CIncludes / SoundComponents.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-29  |  17.5 KB  |  463 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        SoundComponents.h
  3.  
  4.      Contains:    Sound Components Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.1.3
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __SOUNDCOMPONENTS__
  21. #define __SOUNDCOMPONENTS__
  22.  
  23. #ifndef rez
  24.  
  25. #ifndef __TYPES__
  26. #include <Types.h>
  27. #endif
  28. /*    #include <ConditionalMacros.h>                                */
  29.  
  30. #ifndef __COMPONENTS__
  31. #include <Components.h>
  32. #endif
  33. /*    #include <MixedMode.h>                                        */
  34.  
  35. #ifndef __SOUND__
  36. #include <Sound.h>
  37. #endif
  38.  
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42.  
  43. #if PRAGMA_ALIGN_SUPPORTED
  44. #pragma options align=mac68k
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT_SUPPORTED
  48. #pragma import on
  49. #endif
  50.  
  51. #endif /* rez */
  52.  
  53.  
  54. /*
  55.                         * * *  N O T E  * * *
  56.  
  57.     This file has been updated to include Sound Manager 3.2 interfaces.
  58.  
  59.     Some of the Sound Manager 3.0 interfaces were not put into the InterfaceLib
  60.     that originally shipped with the PowerMacs. These missing functions and the
  61.     new 3.2 interfaces have been released in the SoundLib library for PowerPC
  62.     developers to link with. The runtime library for these functions are
  63.     installed by Sound Manager 3.2. The following functions are found in SoundLib.
  64.  
  65.         AudioGetBass, AudioGetInfo, AudioGetMute, AudioGetOutputDevice,
  66.         AudioGetTreble, AudioGetVolume, AudioMuteOnEvent, AudioSetBass,
  67.         AudioSetMute, AudioSetToDefaults, AudioSetTreble, AudioSetVolume,
  68.         OpenMixerSoundComponent, CloseMixerSoundComponent, SoundComponentAddSource,
  69.         SoundComponentGetInfo, SoundComponentGetSource, SoundComponentGetSourceData,
  70.         SoundComponentInitOutputDevice, SoundComponentPauseSource,
  71.         SoundComponentPlaySourceBuffer, SoundComponentRemoveSource,
  72.         SoundComponentSetInfo, SoundComponentSetOutput, SoundComponentSetSource,
  73.         SoundComponentStartSource, SoundComponentStopSource
  74. */
  75.  
  76.  
  77. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  78. /* constants*/
  79. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  80.  
  81.  
  82. /*sound component types and subtypes*/
  83. #define kNoSoundComponentType            '****'
  84.  
  85.  
  86. #define kSoundComponentType                'sift'
  87. #define kSoundComponentPPCType            'nift',        //component type for PowerPC code
  88.  
  89. #define     kRate8SubType                'ratb'        /*8-bit rate converter*/
  90. #define     kRate16SubType                'ratw'        /*16-bit rate converter*/
  91. #define kConverterSubType                'conv'        /*sample format converter*/
  92. #define kSndSourceSubType                'sour'        /*generic source component*/
  93.  
  94.  
  95. #define kMixerType                        'mixr'
  96. #define     kMixer8SubType                'mixb'        /*8-bit mixer*/
  97. #define     kMixer16SubType                'mixw'        /*16-bit mixer*/
  98.  
  99.  
  100. #define kSoundOutputDeviceType            'sdev'        /*sound output component*/
  101. #define        kClassicSubType                'clas'        /*classic hardware, i.e. Mac Plus*/
  102. #define     kASCSubType                    'asc '        /*Apple Sound Chip device*/
  103. #define     kDSPSubType                    'dsp '        /*DSP device*/
  104. #define     kAwacsSubType                'awac'        /*Another of Will's Audio Chips device*/
  105. #define     kGCAwacsSubType                'awgc'        /*Awacs audio with Grand Central DMA*/
  106. #define     kSingerSubType                'sing'        /*Singer (via Whitney) based sound*/
  107. #define     kSinger2SubType                'sng2'        /*Singer 2 (via Whitney) for Acme*/
  108. #define     kWhitSubType                'whit',        //Whit sound component for PrimeTime 3
  109. #define     kSoundBlasterSubType        'sbls',        //Sound Blaster for CHRP
  110.  
  111. #define kSoundCompressor                'scom'
  112. #define kSoundDecompressor                'sdec'
  113. #define     kMace3SubType                'MAC3'        /*MACE 3:1*/
  114. #define     kMace6SubType                'MAC6'        /*MACE 6:1*/
  115. #define     kCDXA4SubType                'cdx4'        /*CD/XA 4:1*/
  116. #define     kCDXA2SubType                'cdx2'        /*CD/XA 2:1*/
  117. #define     kIMA4SubType                'ima4'        /*IMA 4:1*/
  118. #define     kULawSubType                'ulaw'        /*µLaw 2:1*/
  119. #define        kLittleEndianSubType        'sowt'        /*Little-endian*/
  120.  
  121.  
  122. /*Audio components and sub-types*/
  123. #define kAudioComponentType                'adio'
  124. #define        kAwacsPhoneSubType            'hphn'
  125. #define        kAudioVisionSpeakerSubType    'telc'
  126. #define        kAudioVisionHeadphoneSubType 'telh'
  127. #define        kSonyTunerSubType            'tvav'
  128.  
  129. /*Sound effects components and sub-types*/
  130. #define kSoundEffectsType                'snfx'
  131. #define     kSSpLocalizationSubType        'snd3'        /*SoundSprocket localization*/
  132.  
  133.  
  134. /*features flags*/
  135. #define k8BitRawIn                    (1 << 0)    /*data description*/
  136. #define k8BitTwosIn                    (1 << 1)
  137. #define k16BitIn                    (1 << 2)
  138. #define kStereoIn                    (1 << 3)
  139. #define k8BitRawOut                    (1 << 8)
  140. #define k8BitTwosOut                (1 << 9)
  141. #define k16BitOut                    (1 << 10)
  142. #define kStereoOut                    (1 << 11)
  143.  
  144.  
  145. #define kReverse                    0x00010000   /* (1L << 16) */ /*function description*/
  146. #define kRateConvert                0x00020000   /* (1L << 17) */
  147. #define kCreateSoundSource            0x00040000   /* (1L << 18) */
  148.  
  149.  
  150. #define kHighQuality                0x00400000   /* (1L << 22) */ /*performance description*/
  151. #define kNonRealTime                0x00800000   /* (1L << 23) */
  152.  
  153.  
  154. #ifndef rez
  155.  
  156. enum {
  157. /*sound component set/get info selectors*/
  158.     siVolume                    = 'volu',
  159.     siHardwareVolume            = 'hvol',
  160.     siSpeakerVolume                = 'svol',
  161.     siHeadphoneVolume            = 'pvol',
  162.     siHardwareVolumeSteps        = 'hstp',
  163.     siHeadphoneVolumeSteps        = 'hdst',
  164.     siHardwareMute                = 'hmut',
  165.     siSpeakerMute                = 'smut',
  166.     siHeadphoneMute                = 'pmut',
  167.     siRateMultiplier            = 'rmul',
  168.     siQuality                    = 'qual',
  169.      siWideStereo                = 'wide',
  170.      siHardwareFormat            = 'hwfm',
  171.      siPreMixerSoundComponent    = 'prmx',
  172.      siPostMixerSoundComponent    = 'psmx',
  173. /*SoundSprocket selectors*/
  174.     siSSpCPULoadLimit            = '3dll',
  175.     siSSpSpeakerSetup            = '3dst',
  176.     siSSpLocalization            = '3dif',
  177. /*format types*/
  178.     kOffsetBinary                = 'raw ',
  179.     kTwosComplement                = 'twos',
  180.     kMACE3Compression            = 'MAC3',
  181.     kMACE6Compression            = 'MAC6'
  182. };
  183.  
  184. /*quality flags*/
  185. enum {
  186. /*use interpolation in rate conversion*/
  187.     kBestQuality                = (1 << 0)
  188. };
  189.  
  190. enum {
  191. /*useful bit masks*/
  192.     kInputMask                    = 0x000000FF,                    /*masks off input bits*/
  193.     kOutputMask                    = 0x0000FF00,                    /*masks off output bits*/
  194.     kOutputShift                = 8,                            /*amount output bits are shifted*/
  195.     kActionMask                    = 0x00FF0000,                    /*masks off action bits*/
  196.     kSoundComponentBits            = 0x00FFFFFF
  197. };
  198.  
  199. enum {
  200. /*SoundComponentPlaySourceBuffer action flags*/
  201.     kSourcePaused                = (1 << 0),
  202.     kPassThrough                = (1L << 16),
  203.     kNoSoundComponentChain        = (1L << 17),
  204. /*flags for OpenMixerSoundComponent*/
  205.     kNoMixing                    = (1 << 0),                        /*don't mix source*/
  206.     kNoSampleRateConversion        = (1 << 1),                        /*don't convert sample rate (i.e. 11 kHz -> 22 kHz)*/
  207.     kNoSampleSizeConversion        = (1 << 2),                        /*don't convert sample size (i.e. 16 -> 8)*/
  208.     kNoSampleFormatConversion    = (1 << 3),                        /*don't convert sample format (i.e. 'twos' -> 'raw ')*/
  209.     kNoChannelConversion        = (1 << 4),                        /*don't convert stereo/mono*/
  210.     kNoDecompression            = (1 << 5),                        /*don't decompress (i.e. 'MAC3' -> 'raw ')*/
  211.     kNoVolumeConversion            = (1 << 6),                        /*don't apply volume*/
  212.     kNoRealtimeProcessing        = (1 << 7)                        /*won't run at interrupt time*/
  213. };
  214.  
  215. /*Audio Component constants*/
  216. enum {
  217. /*Values for whichChannel parameter*/
  218.     audioAllChannels            = 0,                            /*All channels (usually interpreted as both left and right)*/
  219.     audioLeftChannel            = 1,                            /*Left channel*/
  220.     audioRightChannel            = 2,                            /*Right channel*/
  221. /*Values for mute parameter*/
  222.     audioUnmuted                = 0,                            /*Device is unmuted*/
  223.     audioMuted                    = 1,                            /*Device is muted*/
  224. /*Capabilities flags definitions*/
  225.     audioDoesMono                = (1L << 0),                    /*Device supports mono output*/
  226.     audioDoesStereo                = (1L << 1),                    /*Device supports stereo output*/
  227.     audioDoesIndependentChannels = (1L << 2)                    /*Device supports independent software control of each channel*/
  228. };
  229.  
  230. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  231. /* typedefs*/
  232. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  233.  
  234.  
  235. /*ShortFixed consists of an 8 bit, 2's complement integer part in the high byte,*/
  236. /*with an 8 bit fractional part in the low byte; its range is -128 to 127.99609375*/
  237. typedef short ShortFixed;
  238.  
  239. typedef struct SoundParamBlock SoundParamBlock;
  240.  
  241. typedef SoundParamBlock *SoundParamBlockPtr;
  242.  
  243. typedef pascal Boolean (*SoundParamProcPtr)(SoundParamBlockPtr *pb);
  244.  
  245. #if GENERATINGCFM
  246. typedef UniversalProcPtr SoundParamUPP;
  247. #else
  248. typedef SoundParamProcPtr SoundParamUPP;
  249. #endif
  250.  
  251. struct SoundParamBlock {
  252.     long                            recordSize;                    /*size of this record in bytes*/
  253.     SoundComponentData                desc;                        /*description of sound buffer*/
  254.     UnsignedFixed                    rateMultiplier;                /*rate multiplier to apply to sound*/
  255.     short                            leftVolume;                    /*volumes to apply to sound*/
  256.     short                            rightVolume;
  257.     long                            quality;                    /*quality to apply to sound*/
  258.     ComponentInstance                filter;                        /*filter to apply to sound*/
  259.     SoundParamUPP                    moreRtn;                    /*routine to call to get more data*/
  260.     SoundParamUPP                    completionRtn;                /*routine to call when buffer is complete*/
  261.     long                            refCon;                        /*user refcon*/
  262.     short                            result;                        /*result*/
  263. };
  264. typedef struct privateSoundSource *SoundSource;
  265.  
  266. struct SoundComponentLink {
  267.     ComponentDescription             description;                /*Describes the sound component*/
  268.     SoundSource                     mixerID;                    /*Reserved by Apple*/
  269.     SoundSource *                    linkID;                        /*Reserved by Apple*/
  270. };
  271. typedef struct SoundComponentLink SoundComponentLink;
  272. typedef SoundComponentLink *SoundComponentLinkPtr;
  273.  
  274. struct AudioInfo {
  275.     long                            capabilitiesFlags;            /*Describes device capabilities*/
  276.     long                            reserved;                    /*Reserved by Apple*/
  277.     unsigned short                    numVolumeSteps;                /*Number of significant increments between min and max volume*/
  278. };
  279. typedef struct AudioInfo AudioInfo;
  280.  
  281. typedef AudioInfo *AudioInfoPtr;
  282.  
  283. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  284. /* functions for sound components*/
  285. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  286. /*Sound Component dispatch selectors*/
  287.  
  288. enum {
  289. /*these calls cannot be delegated*/
  290.     kSoundComponentInitOutputDeviceSelect = 1,
  291.     kSoundComponentSetSourceSelect = 2,
  292.     kSoundComponentGetSourceSelect = 3,
  293.     kSoundComponentGetSourceDataSelect = 4,
  294.     kSoundComponentSetOutputSelect = 5,
  295.     kDelegatedSoundComponentSelectors = 0x0100,                    /*first selector that can be delegated up the chain*/
  296. /*these calls can be delegated and have own range*/
  297.     kSoundComponentAddSourceSelect = kDelegatedSoundComponentSelectors + 1,
  298.     kSoundComponentRemoveSourceSelect = kDelegatedSoundComponentSelectors + 2,
  299.     kSoundComponentGetInfoSelect = kDelegatedSoundComponentSelectors + 3,
  300.     kSoundComponentSetInfoSelect = kDelegatedSoundComponentSelectors + 4,
  301.     kSoundComponentStartSourceSelect = kDelegatedSoundComponentSelectors + 5,
  302.     kSoundComponentStopSourceSelect = kDelegatedSoundComponentSelectors + 6,
  303.     kSoundComponentPauseSourceSelect = kDelegatedSoundComponentSelectors + 7,
  304.     kSoundComponentPlaySourceBufferSelect = kDelegatedSoundComponentSelectors + 8
  305. };
  306.  
  307. /*Audio Component selectors*/
  308. enum {
  309.     kAudioGetVolumeSelect        = 0,
  310.     kAudioSetVolumeSelect        = 1,
  311.     kAudioGetMuteSelect            = 2,
  312.     kAudioSetMuteSelect            = 3,
  313.     kAudioSetToDefaultsSelect    = 4,
  314.     kAudioGetInfoSelect            = 5,
  315.     kAudioGetBassSelect            = 6,
  316.     kAudioSetBassSelect            = 7,
  317.     kAudioGetTrebleSelect        = 8,
  318.     kAudioSetTrebleSelect        = 9,
  319.     kAudioGetOutputDeviceSelect    = 10,
  320.     kAudioMuteOnEventSelect        = 129
  321. };
  322.  
  323.  
  324.  
  325. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  326. /* Sound Manager 3.0 utilities*/
  327. extern pascal OSErr OpenMixerSoundComponent(SoundComponentDataPtr outputDescription, long outputFlags, ComponentInstance *mixerComponent)
  328.  FOURWORDINLINE(0x203C, 0x0614, 0x0018, 0xA800);
  329. extern pascal OSErr CloseMixerSoundComponent(ComponentInstance ci)
  330.  FOURWORDINLINE(0x203C, 0x0218, 0x0018, 0xA800);
  331.  
  332.  
  333. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  334. /* basic sound component functions*/
  335. extern pascal ComponentResult SoundComponentInitOutputDevice(ComponentInstance ti, long actions)
  336.  FIVEWORDINLINE(0x2F3C, 4, 1, 0x7000, 0xA82A);
  337. extern pascal ComponentResult SoundComponentSetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance source)
  338.  FIVEWORDINLINE(0x2F3C, 8, 2, 0x7000, 0xA82A);
  339. extern pascal ComponentResult SoundComponentGetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance *source)
  340.  FIVEWORDINLINE(0x2F3C, 8, 3, 0x7000, 0xA82A);
  341. extern pascal ComponentResult SoundComponentGetSourceData(ComponentInstance ti, SoundComponentDataPtr *sourceData)
  342.  FIVEWORDINLINE(0x2F3C, 4, 4, 0x7000, 0xA82A);
  343. extern pascal ComponentResult SoundComponentSetOutput(ComponentInstance ti, SoundComponentDataPtr requested, SoundComponentDataPtr *actual)
  344.  FIVEWORDINLINE(0x2F3C, 8, 5, 0x7000, 0xA82A);
  345.  
  346.  
  347. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  348. /* junction methods for the mixer, must be called at non-interrupt level*/
  349. extern pascal ComponentResult SoundComponentAddSource(ComponentInstance ti, SoundSource *sourceID)
  350.  FIVEWORDINLINE(0x2F3C, 4, 0x0101, 0x7000, 0xA82A);
  351. extern pascal ComponentResult SoundComponentRemoveSource(ComponentInstance ti, SoundSource sourceID)
  352.  FIVEWORDINLINE(0x2F3C, 4, 0x0102, 0x7000, 0xA82A);
  353.  
  354.  
  355. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  356. /* info methods*/
  357. extern pascal ComponentResult SoundComponentGetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  358.  FIVEWORDINLINE(0x2F3C, 12, 0x0103, 0x7000, 0xA82A);
  359. extern pascal ComponentResult SoundComponentSetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  360.  FIVEWORDINLINE(0x2F3C, 12, 0x0104, 0x7000, 0xA82A);
  361.  
  362.  
  363. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  364. /* control methods*/
  365. extern pascal ComponentResult SoundComponentStartSource(ComponentInstance ti, short count, SoundSource *sources)
  366.  FIVEWORDINLINE(0x2F3C, 6, 0x0105, 0x7000, 0xA82A);
  367. extern pascal ComponentResult SoundComponentStopSource(ComponentInstance ti, short count, SoundSource *sources)
  368.  FIVEWORDINLINE(0x2F3C, 6, 0x0106, 0x7000, 0xA82A);
  369. extern pascal ComponentResult SoundComponentPauseSource(ComponentInstance ti, short count, SoundSource *sources)
  370.  FIVEWORDINLINE(0x2F3C, 6, 0x0107, 0x7000, 0xA82A);
  371. extern pascal ComponentResult SoundComponentPlaySourceBuffer(ComponentInstance ti, SoundSource sourceID, SoundParamBlockPtr pb, long actions)
  372.  FIVEWORDINLINE(0x2F3C, 12, 0x0108, 0x7000, 0xA82A);
  373.  
  374.  
  375. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  376. /* interface for Audio Components*/
  377. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  378.  
  379.  
  380. /*Volume is described as a value between 0 and 1, with 0 indicating minimum
  381.   volume and 1 indicating maximum volume; if the device doesn't support
  382.   software control of volume, then a value of unimpErr is returned, indicating
  383.   that these functions are not supported by the device*/
  384.  
  385.  
  386. extern pascal ComponentResult AudioGetVolume(ComponentInstance ac, short whichChannel, ShortFixed *volume)
  387.  FIVEWORDINLINE(0x2F3C, 6, 0, 0x7000, 0xA82A);
  388. extern pascal ComponentResult AudioSetVolume(ComponentInstance ac, short whichChannel, ShortFixed volume)
  389.  FIVEWORDINLINE(0x2F3C, 4, 1, 0x7000, 0xA82A);
  390.  
  391.  
  392. /*If the device doesn't support software control of mute, then a value of unimpErr is*/
  393. /*returned, indicating that these functions are not supported by the device*/
  394. extern pascal ComponentResult AudioGetMute(ComponentInstance ac, short whichChannel, short *mute)
  395.  FIVEWORDINLINE(0x2F3C, 6, 2, 0x7000, 0xA82A);
  396. extern pascal ComponentResult AudioSetMute(ComponentInstance ac, short whichChannel, short mute)
  397.  FIVEWORDINLINE(0x2F3C, 4, 3, 0x7000, 0xA82A);
  398.  
  399.  
  400. /*AudioSetToDefaults causes the associated device to reset its volume and mute values*/
  401. /*(and perhaps other characteristics, e.g. attenuation) to "factory default" settings*/
  402. extern pascal ComponentResult AudioSetToDefaults(ComponentInstance ac)
  403.  FIVEWORDINLINE(0x2F3C, 0, 4, 0x7000, 0xA82A);
  404.  
  405.  
  406. /*This routine is required; it must be implemented by all audio components*/
  407. extern pascal ComponentResult AudioGetInfo(ComponentInstance ac, AudioInfoPtr info)
  408.  FIVEWORDINLINE(0x2F3C, 4, 5, 0x7000, 0xA82A);
  409. extern pascal ComponentResult AudioGetBass(ComponentInstance ac, short whichChannel, short *bass)
  410.  FIVEWORDINLINE(0x2F3C, 6, 6, 0x7000, 0xA82A);
  411. extern pascal ComponentResult AudioSetBass(ComponentInstance ac, short whichChannel, short bass)
  412.  FIVEWORDINLINE(0x2F3C, 4, 7, 0x7000, 0xA82A);
  413. extern pascal ComponentResult AudioGetTreble(ComponentInstance ac, short whichChannel, short *Treble)
  414.  FIVEWORDINLINE(0x2F3C, 6, 8, 0x7000, 0xA82A);
  415. extern pascal ComponentResult AudioSetTreble(ComponentInstance ac, short whichChannel, short Treble)
  416.  FIVEWORDINLINE(0x2F3C, 4, 9, 0x7000, 0xA82A);
  417. extern pascal ComponentResult AudioGetOutputDevice(ComponentInstance ac, Component *outputDevice)
  418.  FIVEWORDINLINE(0x2F3C, 4, 10, 0x7000, 0xA82A);
  419.  
  420.  
  421. /*This is routine is private to the AudioVision component.  It enables the watching of the mute key.*/
  422. extern pascal ComponentResult AudioMuteOnEvent(ComponentInstance ac, short muteOnEvent)
  423.  FIVEWORDINLINE(0x2F3C, 2, 129, 0x7000, 0xA82A);
  424.  
  425.  
  426. enum {
  427.     uppSoundParamProcInfo = kPascalStackBased
  428.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  429.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SoundParamBlockPtr*)))
  430. };
  431.  
  432. #if GENERATINGCFM
  433. #define NewSoundParamProc(userRoutine)        \
  434.         (SoundParamUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSoundParamProcInfo, GetCurrentArchitecture())
  435. #else
  436. #define NewSoundParamProc(userRoutine)        \
  437.         ((SoundParamUPP) (userRoutine))
  438. #endif
  439.  
  440. #if GENERATINGCFM
  441. #define CallSoundParamProc(userRoutine, pb)        \
  442.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSoundParamProcInfo, (pb))
  443. #else
  444. #define CallSoundParamProc(userRoutine, pb)        \
  445.         (*(userRoutine))((pb))
  446. #endif
  447.  
  448.  
  449. #if PRAGMA_IMPORT_SUPPORTED
  450. #pragma import off
  451. #endif
  452.  
  453. #if PRAGMA_ALIGN_SUPPORTED
  454. #pragma options align=reset
  455. #endif
  456.  
  457. #ifdef __cplusplus
  458. }
  459. #endif
  460.  
  461. #endif /* rez */
  462. #endif /* __SOUNDCOMPONENTS__ */
  463.